package com.ease.framework.gef.events {
   import com.ease.util.collections.Map;
   import com.ease.common.models.Model;

   import flash.events.Event;

   public class ModelEvent extends Event {
      public static const ModelEvent_SELECTED:String = "ModelEvent_SELECTED";
      public static const ModelEvent_CHANGED:String = "ModelEvent_CHANGED";

      private var _model:Model;
      private var _oldValue:Map;

      public function ModelEvent(type:String, model:Model = null, oldValue:Map = null, bubbles:Boolean = false, cancelable:Boolean = false) {
         super(type, bubbles, cancelable);
         _model = model;
         _oldValue = oldValue;
      }

      public function get model():Model {
         return _model;
      }

      public function get oldValue():Map {
         return _oldValue;
      }
   }
}